import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import iView from 'view-design'
import 'view-design/dist/styles/iview.css';
import i18n from '@/locale'
import config from '@/config'
import importDirective from '@/directive'
import { directive as clickOutside } from 'v-click-outside-x'
//vant-start
import Vant from 'vant';
import 'vant/lib/index.css';
import './index.less'
import { Lazyload } from 'vant';
import '@vant/touch-emulator';
//vant-end
import '@/assets/icons/iconfont.css'
Vue.use(Vant);
Vue.use(Lazyload);
Vue.use(iView, {
  i18n: (key, value) => i18n.t(key, value)
});
// 导入全局常量组件
import global from './libs/global.vue'
Vue.prototype.GLOBAL = global;


/**
 * @description 生产环境关掉提示
 */
Vue.config.productionTip = false
/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = config
/**
 * 注册指令
 */
importDirective(Vue)
Vue.directive('clickOutside', clickOutside)


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  i18n,
  store,
  render: h => h(App)
})
